using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Util
{
	public class TextReaderAdapter : TextReader
	{
		public TextReaderAdapter(StreamEx stream)
		{
			_stream = stream;
		}

		private StreamEx _stream;

		public override int Read()
		{
			if (!_stream.Depleted)
				return _stream.Read();
			else
				return -1;
		}
	}
}
